﻿<Grid x:Class="Daytimer.Controls.Ribbon.PrintControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
		xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:Controls="clr-namespace:Daytimer.Controls"
		xmlns:RibbonControls="clr-namespace:Daytimer.Controls.Ribbon"
		xmlns:Friction="clr-namespace:Daytimer.Controls.Friction"
		xmlns:ext="clr-namespace:Microsoft.Windows.Shell;assembly=Microsoft.Windows.Shell" mc:Ignorable="d"
		d:DesignHeight="400" d:DesignWidth="700" ClipToBounds="True" Background="Transparent" Margin="40,0,5,0"
		Height="{Binding ActualHeight, RelativeSource={RelativeSource FindAncestor, AncestorType=ScrollViewer}}">
	<Grid.RowDefinitions>
		<RowDefinition Height="Auto" />
		<RowDefinition Height="Auto" />
		<RowDefinition Height="Auto" />
		<RowDefinition />
	</Grid.RowDefinitions>
	<Grid.ColumnDefinitions>
		<ColumnDefinition Width="100" />
		<ColumnDefinition Width="180" />
		<ColumnDefinition />
	</Grid.ColumnDefinitions>
	<TextBlock Text="Print" FontSize="40" FontFamily="/Daytimer.Fonts;component/#WeblySleek UI Light"
			Foreground="{DynamicResource BackstageSubHeaderForeground}" Grid.ColumnSpan="3" Margin="0,0,53,0" />
	<RibbonControls:BackstageSquareButton x:Name="printButton" Grid.Row="1" Grid.RowSpan="2" Margin="3,25,0,0"
			IsEnabled="False" Image="pack://application:,,,/Daytimer.Images;component/Images/printer_lg.png"
			Text="Print" Click="printButton_Click" />
	<TextBlock Grid.Row="1" Grid.Column="1" Margin="0,10,0,0" Text="Copies:" HorizontalAlignment="Left"
			VerticalAlignment="Center" />
	<TextBox x:Name="copiesTextBox" Grid.Row="1" Grid.Column="1" Margin="50,10,36,0" VerticalAlignment="Center" Text="1"
			MaxLength="10" IsEnabled="{Binding IsEnabled, ElementName=printButton}" />
	<Friction:FrictionScrollViewerControl Grid.Row="3" Grid.ColumnSpan="2" HorizontalScrollBarVisibility="Disabled"
			VerticalScrollBarVisibility="Auto" Margin="3,5,36,5" Focusable="False" Padding="0,0,10,0">
		<StackPanel Orientation="Vertical" Focusable="False" IsEnabled="{Binding IsEnabled, ElementName=printButton}">
			<StackPanel.Resources>
				<Style x:Key="Header" TargetType="{x:Type TextBlock}">
					<Setter Property="FontSize" Value="20" />
					<Setter Property="Margin" Value="0,10,0,5" />
					<Setter Property="Foreground" Value="{DynamicResource PrintSubHeader}" />
					<Setter Property="IsHitTestVisible" Value="False" />
				</Style>
			</StackPanel.Resources>
			<TextBlock Style="{StaticResource Header}" Text="Printer" />
			<RibbonControls:BackstageComboBox x:Name="printersCombo" SelectedIndex="0"
					SelectionChanged="printersCombo_SelectionChanged">
				<RibbonControls:BackstageComboBoxItem x:Name="noPrintersItem" Header="Finding Available Printers"
						Image="pack://application:,,,/Daytimer.Images;component/Images/printer_lg.png" />
			</RibbonControls:BackstageComboBox>
			<TextBlock Style="{StaticResource Header}" Text="Settings" />
			<RibbonControls:BackstageComboBox x:Name="duplexCombo" Margin="0,0,0,3" SelectedIndex="0">
				<RibbonControls:BackstageComboBoxItem x:Name="oneSide" Header="Print One Sided"
						Description="Only print on one side of the page"
						Image="pack://application:,,,/Daytimer.Images;component/Images/onesided.png" />
				<RibbonControls:BackstageComboBoxItem x:Name="longDuplex" Header="Print on Both Sides"
						Description="Flip pages on long edge"
						Image="pack://application:,,,/Daytimer.Images;component/Images/longduplex.png" />
				<RibbonControls:BackstageComboBoxItem x:Name="shortDuplex" Header="Print on Both Sides"
						Description="Flip pages on short edge"
						Image="pack://application:,,,/Daytimer.Images;component/Images/shortduplex.png" />
				<RibbonControls:BackstageComboBoxItem x:Name="manualDuplex" Header="Manually Print on Both Sides"
						Description="Reload paper when prompted to print the second side"
						Image="pack://application:,,,/Daytimer.Images;component/Images/manualduplex.png" />
			</RibbonControls:BackstageComboBox>
			<RibbonControls:BackstageComboBox x:Name="collationCombo" Margin="0,0,0,3">
				<RibbonControls:BackstageComboBoxItem Header="Collated" Description="1,2,3    1,2,3    1,2,3"
						Image="pack://application:,,,/Daytimer.Images;component/Images/collated.png" />
				<RibbonControls:BackstageComboBoxItem Header="Uncollated" Description="1,1,1    2,2,2    3,3,3"
						Image="pack://application:,,,/Daytimer.Images;component/Images/uncollated.png" />
			</RibbonControls:BackstageComboBox>
			<RibbonControls:BackstageComboBox x:Name="orientationCombo" Margin="0,0,0,3"
					SelectionChanged="orientationCombo_SelectionChanged">
				<RibbonControls:BackstageComboBoxItem Header="Portrait Orientation"
						Image="pack://application:,,,/Daytimer.Images;component/Images/portrait.png" />
				<RibbonControls:BackstageComboBoxItem Header="Landscape Orientation"
						Image="pack://application:,,,/Daytimer.Images;component/Images/landscape.png" />
			</RibbonControls:BackstageComboBox>
			<RibbonControls:BackstageComboBox x:Name="paperSizeCombo" Margin="0,0,0,3"
					SelectionChanged="paperSizeCombo_SelectionChanged">
				<RibbonControls:BackstageComboBox.FooterContent>
					<Button Content="_Custom Size" Click="customSize_Click" />
				</RibbonControls:BackstageComboBox.FooterContent>
			</RibbonControls:BackstageComboBox>
			<RibbonControls:BackstageComboBox x:Name="marginCombo" Margin="0,0,0,3" Height="66"
					SelectionChanged="marginCombo_SelectionChanged">
				<RibbonControls:BackstageComboBox.SelectionContentTemplate>
					<DataTemplate DataType="RibbonControls:BackstageComboBoxItem">
						<Grid>
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="Auto" />
								<ColumnDefinition />
							</Grid.ColumnDefinitions>
							<Grid.RowDefinitions>
								<RowDefinition Height="Auto" />
								<RowDefinition />
							</Grid.RowDefinitions>
							<Grid.Resources>
								<Controls:StringConcatenationConverter x:Key="StringConcatenationConverter" />
							</Grid.Resources>
							<Image Source="{Binding Image}" Grid.RowSpan="2" Width="32" Height="32"
									HorizontalAlignment="Center" VerticalAlignment="Center" />
							<TextBlock x:Name="header"
									Text="{Binding Header, Converter={StaticResource StringConcatenationConverter}, ConverterParameter=' Margins'}"
									Grid.Column="1" Margin="14,-1,9,0" TextTrimming="CharacterEllipsis"
									HorizontalAlignment="Left" VerticalAlignment="Top" />
							<TextBlock x:Name="descrip" Text="{Binding Description}" Grid.Column="1" Grid.Row="1"
									Margin="14,5,9,0" TextTrimming="CharacterEllipsis" Foreground="#FF707071"
									HorizontalAlignment="Left" VerticalAlignment="Top" />
						</Grid>
						<DataTemplate.Triggers>
							<DataTrigger Binding="{Binding Description}" Value="{x:Null}">
								<Setter Property="Visibility" TargetName="descrip" Value="Collapsed" />
								<Setter Property="Grid.RowSpan" TargetName="header" Value="2" />
								<Setter Property="Margin" TargetName="header" Value="14,0,9,0" />
								<Setter Property="VerticalAlignment" TargetName="header" Value="Center" />
							</DataTrigger>
						</DataTemplate.Triggers>
					</DataTemplate>
				</RibbonControls:BackstageComboBox.SelectionContentTemplate>
				<RibbonControls:BackstageComboBox.FooterContent>
					<Button Content="_Custom Margin" Click="customMargin_Click" />
				</RibbonControls:BackstageComboBox.FooterContent>
			</RibbonControls:BackstageComboBox>
			<RibbonControls:BackstageComboBox x:Name="pagesPerSheetCombo" Margin="0,0,0,3">
				<RibbonControls:BackstageComboBoxItem Header="1 Page Per Sheet"
						Image="pack://application:,,,/Daytimer.Images;component/Images/1page.png" Tag="1" />
				<RibbonControls:BackstageComboBoxItem Header="2 Pages Per Sheet"
						Image="pack://application:,,,/Daytimer.Images;component/Images/2pages.png" Tag="2" />
				<RibbonControls:BackstageComboBoxItem Header="4 Pages Per Sheet"
						Image="pack://application:,,,/Daytimer.Images;component/Images/4pages.png" Tag="4" />
				<RibbonControls:BackstageComboBoxItem Header="6 Pages Per Sheet"
						Image="pack://application:,,,/Daytimer.Images;component/Images/6pages.png" Tag="6" />
				<RibbonControls:BackstageComboBoxItem Header="8 Pages Per Sheet"
						Image="pack://application:,,,/Daytimer.Images;component/Images/8pages.png" Tag="8" />
				<RibbonControls:BackstageComboBoxItem Header="16 Pages Per Sheet"
						Image="pack://application:,,,/Daytimer.Images;component/Images/16pages.png" Tag="16" />
			</RibbonControls:BackstageComboBox>
		</StackPanel>
	</Friction:FrictionScrollViewerControl>
	<Border BorderBrush="#FFE1E1E1" BorderThickness="1" Width="1" HorizontalAlignment="Right" Grid.Row="1"
			Grid.RowSpan="3" Grid.Column="1" Margin="0,0,0,5" IsHitTestVisible="False" />
	<DocumentViewer x:Name="documentViewer" Grid.Column="2" Grid.Row="1" Grid.RowSpan="3" Margin="20,0,0,5"
			ext:WindowChrome.IsHitTestVisibleInChrome="True" Visibility="Collapsed">
		<DocumentViewer.Template>
			<ControlTemplate TargetType="{x:Type DocumentViewer}">
				<!--<Border Background="Transparent">-->
				<Friction:FrictionScrollViewerControl x:Name="PART_ContentHost" CanContentScroll="True"
						HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Padding="10,10,0,0"
						IsContentHitTestVisible="False" />
				<!--</Border>-->
			</ControlTemplate>
		</DocumentViewer.Template>
		<DocumentViewer.ContextMenu>
			<ContextMenu>
				<!--<MenuItem
						CommandTarget="{Binding PlacementTarget, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ContextMenu}}}"
						Command="ApplicationCommands.Copy" Uid="MenuItem_24" />
				<MenuItem
						CommandTarget="{Binding PlacementTarget, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ContextMenu}}}"
						Command="ApplicationCommands.Find" Uid="MenuItem_25" />-->
				<MenuItem
						CommandTarget="{Binding PlacementTarget, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ContextMenu}}}"
						Command="NavigationCommands.IncreaseZoom" Uid="MenuItem_26" />
				<MenuItem
						CommandTarget="{Binding PlacementTarget, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ContextMenu}}}"
						Command="NavigationCommands.DecreaseZoom" Uid="MenuItem_27" />
			</ContextMenu>
		</DocumentViewer.ContextMenu>
		<!--<DocumentViewer.Resources>
			<Style TargetType="DocumentPageView">
				<Setter Property="OverridesDefaultStyle" Value="True" />
				<Setter Property="Cursor" Value="AppStarting" />
				<Setter Property="Effect">
					<Setter.Value>
						<DropShadowEffect Color="Black" ShadowDepth="10" />
					</Setter.Value>
				</Setter>
			</Style>
		</DocumentViewer.Resources>-->
	</DocumentViewer>
</Grid>
